"""
jiangke
"""

# a = "hello world"
# print(a)

# a = 1
# if a == 2:
#     print("hello")
# else:
#     print("world")



# 输入输出
# print("hello world")
# name = "nanshan"
# print("hello world", name)

# name = input()
# print("hello world", name)
#
# name = input("Please input your name:")
# print("hello world", name)


# 注释快捷键：ctrl+/
"""
用来输出hello world
"""
# def demo():
#     print("hello world")

# 缩进
# a = 1
# if a == 1:
#     print(1)

# 基本数据类型
# i = 1
# f = 5.3
# s = "hello"
# b = True
# n = None
# #
# if n == None:
#     print("it is none")

# 非~
# if b:
#     print("it is true")
# else:
#     print("it is false")

# 列表
# 比如，列出班里所有同学的名字，就可以用一个list表示：
# persons = ['Nancy', 'Bob', 'Tom']
# print("学生：", persons)
# print("学生人数：", len(persons))


# print("第一个学生：", persons[0])
# l = len(persons)
# print("最后一个学生：", persons[l - 1])
# print("最后一个学生：", persons[-1])

# 可重复
# persons = ['Nancy', 'Bob', 'Tom']
# persons.append("Tom")
# print("学生：", persons)

# 追加append
# persons = ['Nancy', 'Bob', 'Tom']
# print("学生：", persons)
# persons.append("Jerry")
# print("学生：", persons)

# 插入
# persons = ['Nancy', 'Bob', 'Tom']
# print("学生：", persons)
# persons.insert(0, "Jerry")
# print("学生：", persons)

# 修改
# persons = ['Nancy', 'Bob', 'Tom']
# print("学生：", persons)
# persons[1] = "Mike"
# print("学生：", persons)

# 插入
# persons = ['Nancy', 'Bob', 'Tom']
# print("学生：", persons)
# persons.insert(0, "Jerry")
# print("学生：", persons)

# 添加
# persons = ['Nancy', 'Bob', 'Tom']
# print("学生：", persons)
# persons.append("Jerry")
# print("学生：", persons)

# 删除
persons = ['Nancy', 'Bob', 'Tom', 'Jerry']
print("学生：", persons)
persons.pop()
print("学生：", persons)
persons.pop(1)
print("学生：", persons)


#######
# tuple
# persons = ('Nancy', 'Bob', 'Tom', 'Jerry')
# print("学生：", persons)
# print("学生人数：", len(persons))
# print("第一个学生：", persons[0])
# l = len(persons)
# print("最后一个学生：", persons[l - 1])
# print("最后一个学生：", persons[-1])

# persons = ('Nancy', 'Bob', 'Tom', 'Jerry')
# persons[0] = "Mike"

# t = (100)
# print(len(t))

# t = (100, )
# print(len(t))

#########
# 字典
# d = {
#     "name": "talent",
#     "age": 21,
#     "sex": "female"
# }
# print(d)
# print("name:", d["name"])
# print("age:", d["age"])
# print("sex:", d["sex"])
# print(len(d))

# d = {
#     "name": "talent",
#     "age": 21,
#     "sex": "female"
# }
# print(d)
# d["name"] = "Tom"
# print(d)


# in
# d = {
#     "name": "talent",
#     "age": 21,
#     "sex": "female",
#     "hobby": "programing"
# }
# # print(d["hobby"])
#
# if "hobby" in d:
#     print(d["hobby"])
# else:
#     print("no hobby")

# 删除
# d = {
#     "name": "talent",
#     "age": 21,
#     "sex": "female",
#     "hobby": "programing"
# }
# print(d)
# d.pop("hobby")
# print(d)

# d = {
#     "name": "talent",
#     "age": 21,
#     "sex": "female",
# }
#
# d["hobby"] = "programing"

